<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"  %>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>橡树科技－JavaDemoSystem</title>
    <link type="text/css" rel="stylesheet" media="all" href="/static/styles/global.css"/>
    <link type="text/css" rel="stylesheet" media="all" href="/static/styles/global_color.css"/>
    <script type="text/javascript" src="/static/js/jquery-3.3.1.min.js"></script>

    <script type="text/javascript">
        $(function () {
            $("#save").click(function () {
                $.ajax({
                    type: "post",
                    dataType: "json",
                    data: $("#form1").serialize(),
                    url: "${pageContext.request.contextPath}/role/role_modi",
                    success: function (data) {
                        // alert(data);
                        if (data) {
                            alert("修改成功!")
                        } else {
                            alert("修改失败!")
                        }
                    }
                })
            })
        });
    </script>
</head>
<body>
<div id="header"><img src="/static/images/logo.png" alt="logo" class="left"/> <a href="#">[退出]</a></div>

<div id="navi">
    <ul id="menu">
        <li><a href="${pageContext.request.contextPath}/index" class="index_on"></a></li>
        <c:forEach items="${list}" var="c">
            <li><a href="${pageContext.request.contextPath}/${c.url}" class="index_on"></a></li>
        </c:forEach>
        <li><a href="user/user_info.html" class="information_off"></a></li>
        <li><a href="user/user_modi_pwd.html"  class="password_off"></a></li>
    </ul>
</div>
<div id="main">

    <form id="form1" action="##" onsubmit="return false" method="post" class="main_form">

        <input type="text" name="roleId" hidden="hidden" value="${roleInfo.roleId}">
        <div class="text_info clearfix"><span>角色名称：</span></div>
        <div class="input_info">
            <input type="text" class="width200" name="roleName" value="${roleInfo.name}"/>
            <span class="required">*</span>
            <div class="validate_msg_medium">不能为空，且为20长度的字母、数字和汉字的组合</div>
        </div>
        <div class="text_info clearfix"><span>设置权限：</span></div>
        <div class="input_info_high">
            <div class="input_info_scroll">
                <ul>
                    <li>
                        <input type="checkbox" value="管理员" name="name" ${fn:contains(roleInfo.allModuleName,"管理员")?"checked='checked'":""}/>
                        管理员
                    </li>
                    <li>
                        <input type="checkbox" value="角色管理" name="name" ${fn:contains(roleInfo.allModuleName,"角色管理")?"checked='checked'":""}/>
                        角色管理
                    </li>
                    <li>
                        <input type="checkbox" value="资费管理" name="name" ${fn:contains(roleInfo.allModuleName,"资费管理")?"checked='checked'":""}/>
                        资费管理
                    </li>
                    <li>
                        <input type="checkbox" value="账务账号" name="name" ${fn:contains(roleInfo.allModuleName,"账务账号")?"checked='checked'":""}/>
                        财务账号
                    </li>
                    <li>
                        <input type="checkbox" value="业务账号" name="name" ${fn:contains(roleInfo.allModuleName,"业务账号")?"checked='checked'":""}/>
                        业务账号
                    </li>
                    <li>
                        <input type="checkbox" value="账单管理" name="name" ${fn:contains(roleInfo.allModuleName,"账单管理")?"checked='checked'":""}/>
                        账单管理
                    </li>
                    <li>
                        <input type="checkbox" value="报表" name="name" ${fn:contains(roleInfo.allModuleName,"报表")?"checked='checked'":""}/>
                        报表
                    </li>
                </ul>
            </div>
            <span class="required">*</span>
            <div class="validate_msg_tiny">至少选择一个权限</div>
        </div>
        <div class="button_info clearfix">
            <input type="button" value="修改" id="save" class="btn_save" />
            <input type="reset" value="取消" class="btn_save"/>
        </div>
    </form>
</div>
<div id="footer">
    <p>[源自顶端的技术，最优秀的师资，最真实的企业环境，最适用的实战项目]</p>
    <p>版权所有(C)橡树科技IT培训集团公司 </p>
</div>
</body>
</html>
